import { PluginDefinition } from 'yam-types'
import * as schema from './schema.json'
import { helmOperator, helmUninstaller } from './handlers/helm'
import { HelmReleaseConfig } from './types'
import { name, version } from './package.json'

export default {
  name,
  schema,
  version,
  handlers: {
    'prepare[?(@.type=="helm")]': {
      install: helmOperator,
      uninstall: helmUninstaller
    }
  }
} as PluginDefinition<HelmReleaseConfig>